<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html>
<html>
<head>
 <base href="<%=basePath%>">
    <meta charset="UTF-8">
    <meta name="Author" content="Fly">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <link rel = "stylesheet" href = "<%=basePath%>css/shou-032.css">
    <title>Title</title>
    <style>

    </style>
    <script type="text/javascript" src="<%=basePath%>js/jquery-1.10.1.js"></script>
    <script type="text/javascript" src="<%=basePath%>js/shou.js" ></script>
    <script type="text/javascript" src="<%=basePath %>js/fenye.js"></script>
	<script type="text/javascript">
		function upd(id){
			$.ajax({
			"url":"/kss/newCome/updNew.do",
			"type":"post",
			"data":{"staffid":id},
			"success":function(data){
				var z =eval("("+data+")");
				var html="";
				
				$("#special_name_new").val(z.name); 
				$("#staff_ID_edit").val(z.staffid); 
				
				$("#special_date_new").val(z.zt);
			
				
				$("#special_reason_new").val(z.reason);
				
				if(data.jieduan==1){
					$("#special_stage_new").val("阶段一");
				}else if(data.jieduan==2){
					$("#special_stage_new").val("阶段二");
				}else if(data.jieduan==3){
					$("#special_stage_new").val("阶段三");
				}
				
			},
				"error":function(){
				alert("系统繁忙");
			}
			});
			$(".mask_special_new").css("display","block");
		}
	</script>
</head>
<body>


<!--特殊人员-新加入--修改-->
<div class="mask_special_new">
    <div class="mask_content">

        <p>新加入实习生</p>
        <form action = "newCome/updNewCome.do" method="post">
            <div>
                <label class="tao_lab" for = "special_name_new">姓名</label>
                <input id="special_name_new" name="name" type = "text" value="">
            </div>

            <div>
                <label class="tao_lab" for = "special_date_new">加入日期</label>
                <input id="special_date_new" name="zhongtu" type = "date" value="">
            </div>
            <div>
                <label  class="tao_lab" for = "special_stage_new">加入阶段</label>
                <select name = "jieduan" id = "special_stage_new">
                    <!-- <option style="font-size: 16px;color:#999;" >请选择加入阶段</option> -->
                    <option style="color: black" value="1">阶段一</option>
                    <option style="color: black" value="2">阶段二</option>
                    <option style="color: black" value="3">阶段三</option>
                </select>
            </div>
            <div>
                <label  class="tao_lab tao_reason" for = "special_reason_new">加入原因</label>
                <textarea name = "reason" id = "special_reason_new" cols = "41" rows = "5"></textarea>
            </div>
            <input id="staff_ID_edit" name="staffid" type = "hidden" >
            <div class="button">
                <button class="submit" type="submit">确&nbsp&nbsp认</button>
                <span class="cancel_special_new">取&nbsp&nbsp消</span>
            </div>
        </form>
    </div>
</div>

<!--特殊人员-新加入--新增-->
<div class="mask_special_new_add">
    <div class="mask_content">

        <p>新加入实习生</p>
        <form method="post" action="/kss/newCome/addNewCome.do">
            <div>
                <label class="tao_lab" for = "special_number_new_add">编号</label>
                <input id="special_number_new_add" type = "text" name="staffId">
            </div>
            <div>
                <label class="tao_lab" for = "special_name_new_add">姓名</label>
                <input id="special_name_new_add" type = "text" name="staffName">
            </div>
            <div>
                <label class="tao_lab" for = "special_sex_new_add">性别</label>
                 	 <input type="radio" name="staffSex" value="1"  checked/>男
                     <input type="radio" name="staffSex" value="2"  />女
            </div>

            <div>
                <label class="tao_lab" for = "special_date_new_add">加入日期</label>
                <input id="special_date_new_add" type = "date" name="zhongtu">
            </div>
            <div>
                <label  class="tao_lab" for = "special_stage_new_add">加入阶段</label>
                <select name = "jieduan" id = "special_stage_new_add">
                    <option style="font-size: 16px;color:#999;" >请选择加入阶段</option>
                    <option style="color: black" value="1">阶段一</option>
                    <option style="color: black" value="1">阶段二</option>
                    <option style="color: black" value="1">阶段三</option>
                </select>
            </div>
            <div>
                <label  class="tao_lab tao_reason" for = "special_reason_new_add">加入原因</label>
                <textarea name = "reason" id = "special_reason_new_add" cols = "41" rows = "5"></textarea>
            </div>
            <div class="button">
                <button class="submit" type="submit">确&nbsp&nbsp认</button>
                <span class="cancel_special_new_add">取&nbsp&nbsp消</span>
            </div>
        </form>
    </div>
</div>

<!--特殊人员-新加入--删除-->
<div class="mask_special_new_delete">
    <div class="mask_content">

        <p>是否删除</p>
        <form action = "/kss/newCome/delNew.do?staffid=${newInfo.staffid}">
            <div class="button">
                <button class="submit" type="submit">确&nbsp&nbsp认</button>
                <span class="cancel_special_new_delete">删&nbsp&nbsp除</span>
            </div>
        </form>
    </div>
</div>

<div class="head">

</div>
<div class="content">
 <div class="content_left">
        <p class="clp cl1"><a href = "/kss/login/shouye.do">首页</a></p>
        <div class="cld"></div>
        <p class="clp cl2  "><a>实习生信息</a></p>
        <div class="cld cl2_1">
            <li class="cl_li1 "><a href = "/kss/staff/findAllStaff.do?interviewer=ALL&staff_name=null">基本信息</a></li>
            <li class="cl_li2 "><a href = "/kss/apply/findAllApply.do">请假信息</a></li>
        </div>
        <p class="=clp cl3 "><a>培训信息</a></p>
        <div class="cld cl3_1">

            <li class="cl_li6 " ><a href = "/kss/find/findFirstPhase.do">阶段成绩</a></li>
            <li class="cl_li7 "><a href = "/kss/jieduan/findJieDuan.do">综合查询</a></li>

        </div>
        <p class="clp cl4 _clp_ "><a>特殊人员</a></p>
        <div class="cld cl4_1">
            <li class="cl_li4"><a href = "/kss/eliminate/selEliminate.do">淘汰人员</a></li>
            <li class="cl_li5 _cl_li "><a href = "/kss/newCome/getNew.do">新增人员</a></li>
        </div>
        <p class="clp cl5"><a href = "/kss/staff/echarts.do">综合信息</a></p>
        <div  >

        </div>
    </div>

    <!--特殊人员-新加入-->

    <div class="content_right5_1 content_right6">
        <div class="cr1">
            <p>特殊人员-新加入人员</p>
            <table  id="table1">
                <thead>
                <th>姓名</th>
                <th>加入日期</th>
                <th>加入阶段</th>
                
                <th>加入原因</th>
                <th>操作</th>
                <th ><a class="special_new_add" style="cursor: pointer">新增</a></th>
                </thead>
                <tbody>
						<c:forEach items="${newCome}" var="newInfo">
							<tr>
								<td>${newInfo.name}</td>
								<td><fmt:formatDate value="${newInfo.zhongtu}"
										pattern="yyyy-MM-dd hh:mm:ss" />
								</td>
								<td>${newInfo.jieduan}</td>
								<td>${newInfo.reason}</td>
								<td>
									<span class="special_new_edit" onclick="upd(${newInfo.staffid})" ><a href = "javascript:void(0)">修改</a></span>
									<span class="special_new_delete"><a href="/kss/newCome/delNew.do?staffid=${newInfo.staffid}">删除</a></span>
								</td>
							</tr>
						</c:forEach>

                </tbody>
            </table>
        </div>
        <div align="center" style="margin-top:15px">
共<a class="blue" id="sjzl"></a>条记录&nbsp;&nbsp;当前<a class="blue" id="btn0"></a>页&nbsp;&nbsp;&nbsp;
	<a id="btn0"></a>
	<a  href="#" id="btn1">首页</a>
	<a  href="#" id="btn2">上一页</a>
	<a  href="#" id="btn3">下一页</a>
	<a  href="#" id="btn4">尾页</a> &nbsp;&nbsp;
	
	  转到第<input type="text" id="changePage" size="1" maxlength="4" style=" width:30px; text-align:center; border:1px solid #ccc;"/>页
	  <input type="button" id="btn5" value="跳转"/>
</div>
    </div>
</div>

</body>
</html>